package generator

import "beergo/plugins/maker"

func init() {
	User()
}

func User() {
	c := maker.CreateTable("User", "用户表", "sys")
	c.AddText("account", "账号").SetNullable(true)
	c.AddText("password", "密码").SetNullable(true)
	c.AddText("salt", "盐值").SetNullable(true)
	c.AddText("token", "Token").SetNullable(true)
	c.AddText("openid", "OpenId").SetNullable(true)
	c.AddText("pic", "头像").SetNullable(true)
	c.AddText("phone", "手机号").SetNullable(true)
	c.AddText("nickname", "昵称").SetNullable(true)
	c.AddText("realName", "姓名").SetNullable(true)
	//c.AddText("rememberToken", "rememberToken").SetNullable(true)
	//c.AddText("sessionKey", "rememberToken").SetNullable(true)
	//c.AddFloat("amount", "余额").SetNullable(true).SetDefaultValue("0")
	c.AddDateTime("createAt", "创建时间").SetNullable(true).SetIsAutoNowAdd(true)
	c.Generate()
}
